package Lecture6;

import java.util.Scanner;

public class ClassTask3 {

	public static void main(String[] args) {

		Scanner sc = new Scanner (System.in);
		System.out.println("Please enter a letter!");
		String a = sc.nextLine();
		int b = a.length()/2;
		
		String c ="";
		int d = 0;
		boolean result = true;
		
	    for(int i = b; i > 0; i--)
	    {
	    		
	    	c += a.charAt(i-1);
	    	
	    }
	 
	    for (int i = a.length()-b; i < a.length(); i++)
	    {
	    	if(a.charAt(i) != c.charAt(d))
	    	{
	    		result = false;
	    	}
	    	d++;
	    }
	    
	    System.out.println("Your letter is palindrome. " + result);
	}

}
